﻿-- =============================================
-- Script Template
-- =============================================

use KWR
go

delete from dbo.ChaosTransformations
delete from dbo.chaos
go


declare @id int

insert into dbo.Chaos values ('Gra I')

set @id = SCOPE_IDENTITY()

insert into dbo.ChaosTransformations values
(@id, 0.5, 0.0, 0.0, 0.5, 0.0, 0.0, 0.333),
(@id, 0.5, 0.0, 0.0, 0.5, 0.5, 0.0, 0.333),
(@id, 0.5, 0.0, 0.0, 0.5, 0.25, 0.5, 0.333)
go

declare @id int

insert into dbo.Chaos values ('Gra II')

set @id = SCOPE_IDENTITY()

insert into dbo.ChaosTransformations values
(@id, 0.5, 0.0, 0.0, 0.5, 0.0, 0.0, 0.1),
(@id, 0.5, 0.0, 0.0, 0.5, 0.5, 0.0, 0.3),
(@id, 0.5, 0.0, 0.0, 0.5, 0.25, 0.5, 0.6)
go

declare @id int

insert into dbo.Chaos values ('Gra III')

set @id = SCOPE_IDENTITY()

insert into dbo.ChaosTransformations values
(@id, 0,		0, 		0, 		0.16, 	0, 	0, 		0.25),
(@id, 0.2, 		-0.23, 	0.0, 	0.22, 	0, 	1.6, 	0.25),
(@id, -0.15,	0.28, 	0.26, 	0.24, 	0, 	0.44, 	0.25),
(@id, 0.85,		0.04, 	-0.04, 	0.85, 	0, 	1.6, 	0.25)
go

declare @id int

insert into dbo.Chaos values ('Gra IV')

set @id = SCOPE_IDENTITY()

insert into dbo.ChaosTransformations values
(@id, 0,		0, 		0, 		0.16, 	0, 	0, 		0.01),
(@id, 0.85,		0.04, 	-0.04, 	0.85, 	0, 	1.6, 	0.85),
(@id, 0.2, 		-0.23, 	0.0, 	0.22, 	0, 	1.6, 	0.08),
(@id, -0.15,	0.28, 	0.26, 	0.24, 	0, 	0.44, 	0.06)
go


declare @id int

insert into dbo.Chaos values ('Gra V')

set @id = SCOPE_IDENTITY()

insert into dbo.ChaosTransformations values
(@id, 0, 	0, 	0, 	0.25, 	0, 	-0.4, 	0.02),
(@id, 0.035, 	-0.2, 	0.16, 	0.04, 	-0.09, 	0.02, 	0.07),
(@id, -0.04, 	0.2, 	0.16, 	0.04, 	0.083, 	0.12, 	0.07),
(@id, 0.95, 	0.005, 	-0.005, 	0.93, 	-0.002, 	0.5, 	0.84)
go

declare @id int

insert into dbo.Chaos values ('Gra VI')

set @id = SCOPE_IDENTITY()

insert into dbo.ChaosTransformations values
(@id, 0.195, 	-0.488,	0.344, 	0.443, 	0.4431,	0.2452, 0.2),
(@id, 0.462, 	0.414, 	-0.252,	0.361, 	0.2511,	0.5692, 0.2),
(@id, -0.058,	-0.07, 	0.453 ,	-0.111,	0.5976,	0.0969, 0.2),
(@id, -0.035,	0.07, 	-0.469,	-0.022,	0.4884,	0.5069, 0.2),
(@id, -0.637,	0, 	0, 	0.501, 	0.8662,	0.2513,0.2)
go

declare @id int

insert into dbo.Chaos values ('Gra VII')

set @id = SCOPE_IDENTITY()

insert into dbo.ChaosTransformations values
(@id, 0, 	0.577,	-0.577,	0,	0.0951,	0.5893, 0.333333),
(@id, 0, 	0.577,	-0.577,	0,	0.4413,	0.7893, 0.333333),
(@id, 0, 	0.577,	-0.577,	0,	0.0952,	0.9893, 0.333333)
go

declare @id int

insert into dbo.Chaos values ('Gra VIII')

set @id = SCOPE_IDENTITY()

insert into dbo.ChaosTransformations values
(@id, 0.333, 	0,		0,		0.333,	0,		0,		0.25),
(@id, 0.167, 	-0.289,	0.289,	0.167,	0.333,	0,		0.25),
(@id, 0.167, 	0.289,	-0.289,	0.167,	0.5,	0.289,	0.25),
(@id, 0.333, 	0,		0,		0.333,	0.667,	0,		0.25)
go